<?php if(!empty($parent_cates)):?>
<div class="panel panel-fix"> <!-- panel-fix -->
<div class="panel-heading"> <h3 class="panel-title"><span class="glyphicon glyphicon-fire"></span> <?= $category['Category']['name'] ?></h3> </div>
<div class="panel-body">
	<ul class="menu">
		<?php foreach($parent_cates as $k => $v):?>
		
		<?php 
			$url = $this->webroot;
			switch($v['Category']['type']) {
				case 'page':
					$url .= 'pages/detail/' . $v['Category']['id'];
					break;
				
				case 'contact':
					$url .= 'contacts';
					break;

				case 'news':
					$url .= 'news/index/' . $v['Category']['id'];
					break;
					
					
					
				case 'test':
					$url .= 'tests';
					break;
				
				case 'video':
					$url .= 'videos/index/'. $v['Category']['id'];
					break;
					
				case 'askexpert':
					$url .= 'experts';
					break;
					
				case 'register':
					$url .= 'users/register';
					break;
			}
		?>
		<li<?= !empty($info['Category']) && $info['Category']['id'] == $v['Category']['id'] ? ' class="active"' : '' ?>><a href="<?=  $url ?>"><?= $v['Category']['name'] ?></a></li>
		<?php endforeach;?>
	</ul>
</div>
</div>
<?php endif; ?>